<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>OpenPluginInfo</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../styles/styles.css">
<script language="javascript" src='../links.js' type="text/javascript"></script>
</head>
<body>

<h1>OpenPluginInfo</h1>
<div class=navbar>
<a href="../index.html">main</a> |
<a  href="index.html">structures</a><br>
</div>

<div class=shortdescr>
The <dfn>OpenPluginInfo</dfn> structure describes a plugin instance to FAR.
</div>

<pre class=syntax>
struct OpenPluginInfo
{
  int StructSize;
  DWORD Flags;
  const char *HostFile;
  const char *CurDir;
  const char *Format;
  const char *PanelTitle;
  const struct InfoPanelLine *InfoLines;
  int InfoLinesNumber;
  const char * const *DescrFiles;
  int DescrFilesNumber;
  const struct PanelMode *PanelModesArray;
  int PanelModesNumber;
  int StartPanelMode;
  int StartSortMode;
  int StartSortOrder;
  const struct KeyBarTitles *KeyBar;
  const char *ShortcutData;
  long Reserverd;
};
</pre>
<h3>Elements</h3>
<div class=descr>

    <div class=dfn>StructSize</div>
    <div class=dfndescr>This field should contain size of the <dfn>OpenPluginInfo</dfn> structure:<br>
      <code><b>C:</b> Opi.StructSize = sizeof (struct OpenPluginInfo);<br>
      <b>Pascal:</b> Opi.StructSize := SizeOf(Info);</code> </div>
    <div class=dfn>Flags</div>
    <div class=dfndescr>A combination of the following values (the <a name="OPENPLUGININFO_FLAGS">OPENPLUGININFO_FLAGS</a> enumeration):
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Flag</th><th class="cont" width="60%">Description</th></tr>
        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_USEFILTER">OPIF_USEFILTER</a></td>
        <td class="cont" width="60%">Use filter in the plugin panel.</td></tr>

        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_USESORTGROUPS">OPIF_USESORTGROUPS</a></td>
        <td class="cont" width="60%">Use sort groups in the plugin panel.</td></tr>

        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_USEHIGHLIGHTING">OPIF_USEHIGHLIGHTING</a></td>
        <td class="cont" width="60%">Use file highlighting in the plugin panel.</td></tr>

        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_ADDDOTS">OPIF_ADDDOTS</a></td>
        <td class="cont" width="60%">Add &quot;<b><code>..</code></b>&quot; item automatically if it is absent.</td></tr>

        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_RAWSELECTION">OPIF_RAWSELECTION</a></td>
        <td class="cont" width="60%">Folders may be selected regardless of FAR settings.</td></tr>

        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_REALNAMES">OPIF_REALNAMES</a></td>
        <td class="cont" width="60%">Turns on the standard FAR file processing mechanism if requested
        operation is not supported by the plugin. If this flag is set, the items on the plugin panel
        should be real file names.</td></tr>

        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_SHOWNAMESONLY">OPIF_SHOWNAMESONLY</a></td>
        <td class="cont" width="60%">Show file names without paths by default.</td></tr>

        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_SHOWRIGHTALIGNNAMES">OPIF_SHOWRIGHTALIGNNAMES</a></td>
        <td class="cont" width="60%">Show file names right-aligned by default in all panel display modes.</td></tr>

        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_SHOWPRESERVECASE">OPIF_SHOWPRESERVECASE</a></td>
        <td class="cont" width="60%">Show file names using original case regardless of FAR settings.</td></tr>

        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_FINDFOLDERS">OPIF_FINDFOLDERS</a></td>
        <td class="cont" width="60%">Apply "Find file" command for folders.
         The <dfn>OPIF_FINDFOLDERS</dfn> flag has no effect since FAR Manager 1.70 beta 4.
        </td></tr>

        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_COMPAREFATTIME">OPIF_COMPAREFATTIME</a></td>
        <td class="cont" width="60%">Convert timestamps to FAT format for the <i>Compare folders</i> operation.
        Set this flag if the plugin file system doesn't provide the time accuracy necessary for standard
        comparison operations.</td></tr>

        <tr class="cont"><td class="cont" width="40%">
<a name="OPIF_EXTERNALGET">OPIF_EXTERNALGET</a><br>
<a name="OPIF_EXTERNALPUT">OPIF_EXTERNALPUT</a><br>
<a name="OPIF_EXTERNALDELETE">OPIF_EXTERNALDELETE</a><br>
        <a name="OPIF_EXTERNALMKDIR">OPIF_EXTERNALMKDIR</a></td>
        <td class="cont" width="60%">These flags can be used with OPIF_REALNAMES only. Forces usage
          of corresponding internal FAR functions, even if plugin exports such function.</td></tr>

        <tr class="cont"><td class="cont" width="40%"><a name="OPIF_USEATTRHIGHLIGHTING">OPIF_USEATTRHIGHLIGHTING</a></td>
        <td class="cont" width="60%">
        <u>FAR Manager 1.70 build #963 and below</u>: use attribute-based file highlighting.
        All file highlighting templates, except <code>*</code> and <code>*.*</code> will be ignored.<br>
        <u>FAR Manager 1.70 build #964 and above</u>: use attributes only for file highlighting.
        File names will be ignored. Color is chosen from file color groups, which have templates
        excluded from analysis (i.e. option "<code>[ ] Match file mask(s)</code>" in file
        highlighting setup dialog is off).
        </td></tr>
</table>
    </div>

    <div class=dfn>HostFile</div>
    <div class=dfndescr>File name on emulated file system. If plugin doesn't emulate a file system based on files,
         set this field to <code>NULL</code>.</div>
    <div class=dfn>CurDir</div>
    <div class=dfndescr>Current directory of plugin. If plugin returns empty string here, FAR will close plugin automatically
         if ENTER is pressed on ".." item.</div>
    <div class=dfn>Format</div>
    <div class=dfndescr>Plugin's format name. This is shown in the file copy dialog.</div>
    <div class=dfn>PanelTitle</div>
    <div class=dfndescr>Plugin panel header.</div>
    <div class=dfn>InfoLines</div>
    <div class=dfndescr>Pointer to an array of &nbsp;<a href="infopanelline.html">InfoPanelLine</a> structures.
    Each structure describes one line in the information panel. If no plugin-dependent information needs to be shown in the
    information panel, set this field to <code>NULL</code>.</div>
    <div class=dfn>InfoLinesNumber</div>
    <div class=dfndescr>Number of structures in <dfn>InfoPanelLine</dfn>.</div>
    <div class=dfn>DescrFiles</div>
    <div class=dfndescr>Pointer to an array of pointers to strings with description file names.
      FAR tries to read these files (using the <a href="../exported_functions/getfiles.html">GetFiles</a> function)
      when descriptions are shown and refresh them after file processing, if
      the <dfn>PPIF_PROCESSDESCR</dfn> flag in the <a href="pluginpanelitem.html">PluginPanelItem</a> structure
      was set. Depending on the plugin type, description processing can take significant time.
      If you don't need this functionality, set the field to <code>NULL</code>.</div>
    <div class=dfn>DescrFilesNumber</div>
    <div class=dfndescr>Number of description file names.</div>
    <div class=dfn>PanelModesArray</div>
    <div class=dfndescr>Pointer to an array of <a href="panelmode.html">PanelMode</a> structures.
    Panel display mode settings can be redefined using this field.
    The first structure describes display mode number 0, the second - number 1, etc.
    If new panel display modes are not required, set the field to <code>NULL</code>.</div>
    <div class=dfn>PanelModesNumber</div>
    <div class=dfndescr>Number of <a href="panelmode.html">PanelMode</a> structures.</div>
    <div class=dfn>StartPanelMode</div>
    <div class=dfndescr>The panel display mode to set on panel creation.
    Must be in the form <b><code>'0'+&lt;view mode number&gt;</code></b>.
    For example, '1' (0x31) will set Brief view mode. If you don't want to change panel display mode
    at plugin startup, set the field to 0.</div>

    <div class=dfn>StartSortMode</div>
    <div class=dfndescr><a href="../defs/sortmetods.html">The sort mode</a> to set on panel creation.
    One of the following values can be specified:
    SM_UNSORTED, SM_NAME, SM_EXT, SM_MTIME, SM_CTIME, SM_ATIME, SM_SIZE, SM_DESCR, SM_OWNER, SM_COMPRESSEDSIZE, SM_NUMLINKS.
    If you don't want to change sort mode at plugin startup, set the field to SM_DEFAULT or 0.</div>

    <div class=dfn>StartSortOrder</div>
    <div class=dfndescr>If <i>StartSortMode</i> is specified, this field must be used
    to set sort direction: 0 for ascending, 1 - for descedning.</div>

    <div class=dfn>KeyBar</div>
    <div class=dfndescr>Pointer to the <a href="keybartitles.html">KeyBarTitles</a> structure.
    Function key labels are redefined using this field.
    Set to <code>NULL</code> if not required.</div>

    <div class=dfn>ShortcutData</div>
    <div class=dfndescr>Pointer to a null-terminated string, which describes the current state of the plugin.
    The length of string should be less than or equal to <dfn><a name="MAXSIZE_SHORTCUTDATA">MAXSIZE_SHORTCUTDATA</a></dfn>.
    This string is passed to the <a href="../exported_functions/openplugin.html">OpenPlugin</a> function,
    when the plugin is activated by the link to folder command.
    For example, an FTP client can place the server host name, login and password here.
    The current directory is not required as FAR will restore this itself.<br>
    If no additional information is required for activation of links to a folder, set this field to <code>NULL</code>. </div>
    <div class=dfn>Reserverd</div>
    <div class=dfndescr>Reserved for future use, set to 0.</div>

</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
  <li>All data, passed through this structure should be valid after return from
   the <a href="../exported_functions/getopenplugininfo.html">GetOpenPluginInfo</a> function.
   This means, for example, that pointers to the stack are not allowed,
   use static or global variables instead.
  <li>When this structure is passed to a plugin's
      <a href="../exported_functions/getopenplugininfo.html">GetOpenPluginInfo</a> function,
   it can be assumed to be cleared to zeros.
</ol>
</div>


<div class=see>See also:</div><div class=seecont>
<a href="index.html">structures</a> |
<a href="../delphi/topenplugininfo.html">TOpenPluginInfo</a>
</div>

</body>
</html>